package ru.pb.auth.network.engine;

import ru.pb.auth.network.clients.GameServerClient;
import ru.pb.auth.network.threading.ThreadPoolManager;
import ru.pb.global.network.engine.NioService;
import ru.pb.global.network.engine.NioSession;
import ru.pb.global.network.engine.core.interfaces.IClientFactory;
import ru.pb.global.network.engine.core.interfaces.IPacketExecutor;
import ru.pb.global.network.engine.packets.Packet;

/**
 * Фактори для подключения Игровых Серверов.
 * 
 * @author Felixx
 */
public class GameClientFactory implements IClientFactory<GameServerClient>, IPacketExecutor
{
	@Override
	public GameServerClient create(NioSession<GameServerClient> session, NioService<GameServerClient> service, IPacketExecutor ex)
	{
		return new GameServerClient(session, service, ex);
	}

	@Override
	public void executePacket(Packet run)
	{
		ThreadPoolManager.getInstance().execute(run);
	}
}